package summer.codegenerator.model.enumeration;

import com.alibaba.fastjson.annotation.JSONType;
import summer.codegenerator.common.annotation.ExportEnum;
import summer.codegenerator.model.base.EnumFastJSONDeserializer;
import summer.codegenerator.model.base.EnumFastJSONSerializer;
import summer.codegenerator.model.base.EnumIndexable;

/**
 * 
 * 
 * @author 蒋振
 * @since 2019年6月21日 上午9:42:05
 */
@ExportEnum
@JSONType(serializeEnumAsJavaBean = true, serializer = EnumFastJSONSerializer.class, deserializer = EnumFastJSONDeserializer.class)
public enum EntityAttributeValueType implements EnumIndexable {
	STRING(1, "字符串"),
	NUMBER_INT_4(2, "小整数"),
	NUMBER_INT_8(3, "大整数"),
	NUMBER_FLOAT_4(4, "小浮点数（不精确）"),
	NUMBER_FLOAT_8(5, "大浮点数（不精确）"),
	NUMBER_DECIMAL(6, "定点数（精确）"),
	BOOLEAN(7, "布尔");

	private Integer index;

	private String text;

	private EntityAttributeValueType(Integer index, String text) {
		this.index = index;
		this.text = text;
	}

	@Override
	public Integer getIndex() {
		return index;
	}

	public String getText() {
		return text;
	}
}
